package main

import (
	"fmt"
	"net/rpc"
)

type Reply struct {
	Msg []byte
}

func call(client *rpc.Client) {
	var reply Reply
	err := client.Call("S.Recv", &struct{}{}, &reply)
	if err != nil {
		fmt.Println("failed to call", err)
	}
	fmt.Println("reply:", string(reply.Msg))
}

func main() {
	client, _ := rpc.Dial("tcp", "127.0.0.1:2015")
	go call(client)
	go call(client)
	var a int
	fmt.Scanf("%d", &a)
	client.Close()
}
